package com.beeantec.jnrerc.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 课程
 * </p>
 *
 * @author anthony
 * @since 2022-01-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("exam")
public class Exam extends Model<Exam> {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    private String id;

    /**
     * 考试名称
     */
    private String title;

    /**
     * 考试描述
     */
    private String content;

    /**
     * 是否公开
     */
    private Integer open;

    /**
     * 口令密码
     */
    private String password;

    /**
     * 课程状态
     */
    private Integer state;

    /**
     * 考试规则ID
     */
    private String ruleId;

    /**
     * 是否限时
     */
    private Integer timeLimit;

    /**
     * 开始时间
     */
    private Date startTime;

    /**
     * 结束时间
     */
    private Date endTime;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 主观题分数
     */
    private Integer subjScore;



    /**
     * 考试封面
     */
    private String cover;

    /**
     * 客观题分数
     */
    private Integer objScore;

    /**
     * 总分数
     */
    private Integer totalScore;

    /**
     * 总时长（分钟）
     */
    private Integer totalTime;

    /**
     * 及格分数
     */
    private Integer qualifyScore;

    /**
     * 补考次数
     */
    private Integer retryCount;

    /**
     * 课程Id
     */
    @TableField("cId")
    private Long cId;

    /**
     * 部门Id
     */
    @TableField("pId")
    private Long pId;


    public static final String ID = "id";

    public static final String TITLE = "title";

    public static final String CONTENT = "content";

    public static final String OPEN = "open";

    public static final String PASSWORD = "password";

    public static final String STATE = "state";

    public static final String RULE_ID = "rule_id";

    public static final String TIME_LIMIT = "time_limit";

    public static final String START_TIME = "start_time";

    public static final String END_TIME = "end_time";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String SUBJ_SCORE = "subj_score";

    public static final String OBJ_SCORE = "obj_score";

    public static final String TOTAL_SCORE = "total_score";

    public static final String TOTAL_TIME = "total_time";

    public static final String QUALIFY_SCORE = "qualify_score";

    public static final String RETRY_COUNT = "retry_count";

    public static final String CID = "cId";

    public static final String PID = "pId";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
